<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QuantumLibrary: Bloomberg::quantum::IThreadContext&lt; RET &gt; Interface Template Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">QuantumLibrary
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html','../../');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d1/d13/structBloomberg_1_1quantum_1_1IThreadContext-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Bloomberg::quantum::IThreadContext&lt; RET &gt; Interface Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Exposes methods to manipulate the thread context.  
 <a href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="../../d3/d38/quantum__ithread__context_8h_source.html">quantum_ithread_context.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Bloomberg::quantum::IThreadContext&lt; RET &gt;:</div>
<div class="dyncontent">
 <div class="center">
  <img src="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.png" usemap="#Bloomberg::quantum::IThreadContext_3C_20RET_20_3E_map" alt=""/>
  <map id="Bloomberg::quantum::IThreadContext_3C_20RET_20_3E_map" name="Bloomberg::quantum::IThreadContext_3C_20RET_20_3E_map">
<area href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html" title="Exposes methods to manipulate the thread context, especially future wait methods." alt="Bloomberg::quantum::IThreadContextBase" shape="rect" coords="0,56,262,80"/>
<area href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html" title="This interface exposes shared functionality between IThreadContext and ICoroContext." alt="Bloomberg::quantum::IContextBase" shape="rect" coords="0,0,262,24"/>
<area href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html" title="Concrete class representing a coroutine or a thread context." alt="Bloomberg::quantum::Context&lt; RET &gt;" shape="rect" coords="0,168,262,192"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ac70ef12cc80708a891d3ca1090adff2e"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#ac70ef12cc80708a891d3ca1090adff2e">ContextTag</a> = <a class="el" href="../../de/de9/structBloomberg_1_1quantum_1_1ThreadContextTag.html">ThreadContextTag</a></td></tr>
<tr class="separator:ac70ef12cc80708a891d3ca1090adff2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b7724a925c43a5a9661e90f7f331651"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a0b7724a925c43a5a9661e90f7f331651">Ptr</a> = std::shared_ptr&lt; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a>&lt; RET &gt; &gt;</td></tr>
<tr class="separator:a0b7724a925c43a5a9661e90f7f331651"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3c1dd50a3abd82d5d881eeda65e32e5"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#ab3c1dd50a3abd82d5d881eeda65e32e5">Impl</a> = <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html">Context</a>&lt; RET &gt;</td></tr>
<tr class="separator:ab3c1dd50a3abd82d5d881eeda65e32e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_structBloomberg_1_1quantum_1_1IThreadContextBase"><td colspan="2" onclick="javascript:toggleInherit('pub_types_structBloomberg_1_1quantum_1_1IThreadContextBase')"><img src="../../closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html">Bloomberg::quantum::IThreadContextBase</a></td></tr>
<tr class="memitem:a95643a462eecd0836f9fd348703f77a2 inherit pub_types_structBloomberg_1_1quantum_1_1IThreadContextBase"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#a95643a462eecd0836f9fd348703f77a2">Ptr</a> = std::shared_ptr&lt; <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html">IThreadContextBase</a> &gt;</td></tr>
<tr class="separator:a95643a462eecd0836f9fd348703f77a2 inherit pub_types_structBloomberg_1_1quantum_1_1IThreadContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_structBloomberg_1_1quantum_1_1IContextBase"><td colspan="2" onclick="javascript:toggleInherit('pub_types_structBloomberg_1_1quantum_1_1IContextBase')"><img src="../../closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html">Bloomberg::quantum::IContextBase</a></td></tr>
<tr class="memitem:ac92e5d294479f777fd01f5621e4f8db9 inherit pub_types_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a> = std::shared_ptr&lt; <a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html">IContextBase</a> &gt;</td></tr>
<tr class="separator:ac92e5d294479f777fd01f5621e4f8db9 inherit pub_types_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a61b2eb7438e46915e411d3fd7e96b82d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a61b2eb7438e46915e411d3fd7e96b82d">wait</a> () const =0</td></tr>
<tr class="memdesc:a61b2eb7438e46915e411d3fd7e96b82d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for the future associated with this context to be ready.  <a href="#a61b2eb7438e46915e411d3fd7e96b82d">More...</a><br /></td></tr>
<tr class="separator:a61b2eb7438e46915e411d3fd7e96b82d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bb2b08d8b6688e2186aaf3afb394dae"><td class="memItemLeft" align="right" valign="top">virtual std::future_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a0bb2b08d8b6688e2186aaf3afb394dae">waitFor</a> (std::chrono::milliseconds timeMs) const =0</td></tr>
<tr class="memdesc:a0bb2b08d8b6688e2186aaf3afb394dae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for the future associated with this context to be ready for a maximum of 'timeMs' milliseconds.  <a href="#a0bb2b08d8b6688e2186aaf3afb394dae">More...</a><br /></td></tr>
<tr class="separator:a0bb2b08d8b6688e2186aaf3afb394dae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac31560ef1209af2c86a76260dd70b189"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#ac31560ef1209af2c86a76260dd70b189">waitAt</a> (int num) const =0</td></tr>
<tr class="memdesc:ac31560ef1209af2c86a76260dd70b189"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for the future in the 'num-th' continuation context to be ready.  <a href="#ac31560ef1209af2c86a76260dd70b189">More...</a><br /></td></tr>
<tr class="separator:ac31560ef1209af2c86a76260dd70b189"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6488bdb8b5c270ebaa069d7d9ed5819a"><td class="memItemLeft" align="right" valign="top">virtual std::future_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a6488bdb8b5c270ebaa069d7d9ed5819a">waitForAt</a> (int num, std::chrono::milliseconds timeMs) const =0</td></tr>
<tr class="memdesc:a6488bdb8b5c270ebaa069d7d9ed5819a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for the future in the 'num-th' continuation context to be ready for a maximum of 'timeMs' milliseconds.  <a href="#a6488bdb8b5c270ebaa069d7d9ed5819a">More...</a><br /></td></tr>
<tr class="separator:a6488bdb8b5c270ebaa069d7d9ed5819a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4724f410e1d41c185f46ad394ad3bbe2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a4724f410e1d41c185f46ad394ad3bbe2">waitAll</a> () const =0</td></tr>
<tr class="memdesc:a4724f410e1d41c185f46ad394ad3bbe2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for all the futures in the continuation chain to be ready.  <a href="#a4724f410e1d41c185f46ad394ad3bbe2">More...</a><br /></td></tr>
<tr class="separator:a4724f410e1d41c185f46ad394ad3bbe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c969eafd7cdd1b694c33194a9dd7c09"><td class="memTemplParams" colspan="2">template&lt;class V  = RET&gt; </td></tr>
<tr class="memitem:a8c969eafd7cdd1b694c33194a9dd7c09"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a0a7dd2b5f475bbecb11bfa87fcc251c5">NonBufferRetType</a>&lt; V &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a8c969eafd7cdd1b694c33194a9dd7c09">get</a> ()</td></tr>
<tr class="memdesc:a8c969eafd7cdd1b694c33194a9dd7c09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the future value associated with this context.  <a href="#a8c969eafd7cdd1b694c33194a9dd7c09">More...</a><br /></td></tr>
<tr class="separator:a8c969eafd7cdd1b694c33194a9dd7c09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2eed7d5de4d43b5c5c214cb38b239acd"><td class="memTemplParams" colspan="2">template&lt;class V  = RET&gt; </td></tr>
<tr class="memitem:a2eed7d5de4d43b5c5c214cb38b239acd"><td class="memTemplItemLeft" align="right" valign="top">const <a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a0a7dd2b5f475bbecb11bfa87fcc251c5">NonBufferRetType</a>&lt; V &gt; &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a2eed7d5de4d43b5c5c214cb38b239acd">getRef</a> () const</td></tr>
<tr class="memdesc:a2eed7d5de4d43b5c5c214cb38b239acd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a reference the future value associated with this context.  <a href="#a2eed7d5de4d43b5c5c214cb38b239acd">More...</a><br /></td></tr>
<tr class="separator:a2eed7d5de4d43b5c5c214cb38b239acd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d04a093d07bf66ead58603592295352"><td class="memTemplParams" colspan="2">template&lt;class OTHER_RET &gt; </td></tr>
<tr class="memitem:a8d04a093d07bf66ead58603592295352"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a0a7dd2b5f475bbecb11bfa87fcc251c5">NonBufferRetType</a>&lt; OTHER_RET &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a8d04a093d07bf66ead58603592295352">getAt</a> (int num)</td></tr>
<tr class="memdesc:a8d04a093d07bf66ead58603592295352"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the future value from the 'num-th' continuation context.  <a href="#a8d04a093d07bf66ead58603592295352">More...</a><br /></td></tr>
<tr class="separator:a8d04a093d07bf66ead58603592295352"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5456b3de0627bee9695946acf745e195"><td class="memTemplParams" colspan="2">template&lt;class OTHER_RET &gt; </td></tr>
<tr class="memitem:a5456b3de0627bee9695946acf745e195"><td class="memTemplItemLeft" align="right" valign="top">const <a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a0a7dd2b5f475bbecb11bfa87fcc251c5">NonBufferRetType</a>&lt; OTHER_RET &gt; &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a5456b3de0627bee9695946acf745e195">getRefAt</a> (int num) const</td></tr>
<tr class="memdesc:a5456b3de0627bee9695946acf745e195"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a reference to the future value from the 'num-th' continuation context.  <a href="#a5456b3de0627bee9695946acf745e195">More...</a><br /></td></tr>
<tr class="separator:a5456b3de0627bee9695946acf745e195"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5612c3e719e8fe2104ada21a10767b4a"><td class="memTemplParams" colspan="2">template&lt;class V , class  = NonBufferType&lt;RET,V&gt;&gt; </td></tr>
<tr class="memitem:a5612c3e719e8fe2104ada21a10767b4a"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a5612c3e719e8fe2104ada21a10767b4a">set</a> (V &amp;&amp;value)</td></tr>
<tr class="memdesc:a5612c3e719e8fe2104ada21a10767b4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the promised value associated with this context.  <a href="#a5612c3e719e8fe2104ada21a10767b4a">More...</a><br /></td></tr>
<tr class="separator:a5612c3e719e8fe2104ada21a10767b4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6e481262f106b0ed5fd5c0b86978c03"><td class="memTemplParams" colspan="2">template&lt;class V , class  = BufferType&lt;RET,V&gt;&gt; </td></tr>
<tr class="memitem:ab6e481262f106b0ed5fd5c0b86978c03"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#ab6e481262f106b0ed5fd5c0b86978c03">push</a> (V &amp;&amp;value)</td></tr>
<tr class="memdesc:ab6e481262f106b0ed5fd5c0b86978c03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Push a single value into the promise buffer.  <a href="#ab6e481262f106b0ed5fd5c0b86978c03">More...</a><br /></td></tr>
<tr class="separator:ab6e481262f106b0ed5fd5c0b86978c03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65ced94956cdfff4ad094897b14f8234"><td class="memTemplParams" colspan="2">template&lt;class V  = RET&gt; </td></tr>
<tr class="memitem:a65ced94956cdfff4ad094897b14f8234"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a3e3f89ff8206c0514976b423cb7199cd">BufferRetType</a>&lt; V &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a65ced94956cdfff4ad094897b14f8234">pull</a> (bool &amp;isBufferClosed)</td></tr>
<tr class="memdesc:a65ced94956cdfff4ad094897b14f8234"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pull a single value from the future buffer.  <a href="#a65ced94956cdfff4ad094897b14f8234">More...</a><br /></td></tr>
<tr class="separator:a65ced94956cdfff4ad094897b14f8234"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef2bff661268949c9c598e0674ff7254"><td class="memTemplParams" colspan="2">template&lt;class V  = RET, class  = BufferRetType&lt;V&gt;&gt; </td></tr>
<tr class="memitem:aef2bff661268949c9c598e0674ff7254"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#aef2bff661268949c9c598e0674ff7254">closeBuffer</a> ()</td></tr>
<tr class="memdesc:aef2bff661268949c9c598e0674ff7254"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close a promise buffer.  <a href="#aef2bff661268949c9c598e0674ff7254">More...</a><br /></td></tr>
<tr class="separator:aef2bff661268949c9c598e0674ff7254"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a974f72467140b4d4047d8b76d2011703"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a974f72467140b4d4047d8b76d2011703">getNumCoroutineThreads</a> () const</td></tr>
<tr class="memdesc:a974f72467140b4d4047d8b76d2011703"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of underlying coroutine threads as specified in the dispatcher constructor. If -1 was passed than this number essentially indicates the number of cores.  <a href="#a974f72467140b4d4047d8b76d2011703">More...</a><br /></td></tr>
<tr class="separator:a974f72467140b4d4047d8b76d2011703"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf40c9f4c874571d103a2b40c2dbf554"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#aaf40c9f4c874571d103a2b40c2dbf554">getNumIoThreads</a> () const</td></tr>
<tr class="memdesc:aaf40c9f4c874571d103a2b40c2dbf554"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of underlying IO threads as specified in the dispatcher constructor.  <a href="#aaf40c9f4c874571d103a2b40c2dbf554">More...</a><br /></td></tr>
<tr class="separator:aaf40c9f4c874571d103a2b40c2dbf554"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42ea867e65bc7e31a4373dc2142cef75"><td class="memItemLeft" align="right" valign="top">const std::pair&lt; int, int &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a42ea867e65bc7e31a4373dc2142cef75">getCoroQueueIdRangeForAny</a> () const</td></tr>
<tr class="memdesc:a42ea867e65bc7e31a4373dc2142cef75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the range [minQueueId, maxQueueId] of coroutine queueIds covered by <a class="el" href="../../d2/db0/structBloomberg_1_1quantum_1_1IQueue.html#aec9f17dc0836162032f0239b2415649eaed36a1ef76a59ee3f15180e0441188ad">IQueue::QueueId::Any</a> by the <a class="el" href="../../d0/da5/classBloomberg_1_1quantum_1_1Dispatcher.html" title="Parallel execution engine used to run coroutines or IO tasks asynchronously. This class is the main e...">Dispatcher</a>.  <a href="#a42ea867e65bc7e31a4373dc2142cef75">More...</a><br /></td></tr>
<tr class="separator:a42ea867e65bc7e31a4373dc2142cef75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a6bbcc70d8d886864351513680ede87"><td class="memTemplParams" colspan="2">template&lt;class OTHER_RET  = int, class FUNC , class ... ARGS&gt; </td></tr>
<tr class="memitem:a7a6bbcc70d8d886864351513680ede87"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a>&lt; OTHER_RET &gt;::<a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a7a6bbcc70d8d886864351513680ede87">then</a> (FUNC &amp;&amp;func, ARGS &amp;&amp;... args)</td></tr>
<tr class="memdesc:a7a6bbcc70d8d886864351513680ede87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Posts a function to run asynchronously.  <a href="#a7a6bbcc70d8d886864351513680ede87">More...</a><br /></td></tr>
<tr class="separator:a7a6bbcc70d8d886864351513680ede87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa911856faa7b71962984a101cfb59cf0"><td class="memTemplParams" colspan="2">template&lt;class OTHER_RET  = int, class FUNC , class ... ARGS&gt; </td></tr>
<tr class="memitem:aa911856faa7b71962984a101cfb59cf0"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a>&lt; OTHER_RET &gt;::<a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#aa911856faa7b71962984a101cfb59cf0">onError</a> (FUNC &amp;&amp;func, ARGS &amp;&amp;... args)</td></tr>
<tr class="memdesc:aa911856faa7b71962984a101cfb59cf0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Posts a function to run asynchronously. This is the error handler for a continuation chain and acts as as a 'catch' clause.  <a href="#aa911856faa7b71962984a101cfb59cf0">More...</a><br /></td></tr>
<tr class="separator:aa911856faa7b71962984a101cfb59cf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affbdb2bb8e1292cddd90684e4fa6d1f4"><td class="memTemplParams" colspan="2">template&lt;class OTHER_RET  = int, class FUNC , class ... ARGS&gt; </td></tr>
<tr class="memitem:affbdb2bb8e1292cddd90684e4fa6d1f4"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a>&lt; OTHER_RET &gt;::<a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#affbdb2bb8e1292cddd90684e4fa6d1f4">finally</a> (FUNC &amp;&amp;func, ARGS &amp;&amp;... args)</td></tr>
<tr class="memdesc:affbdb2bb8e1292cddd90684e4fa6d1f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Posts a function to run asynchronously. This function is always guaranteed to run.  <a href="#affbdb2bb8e1292cddd90684e4fa6d1f4">More...</a><br /></td></tr>
<tr class="separator:affbdb2bb8e1292cddd90684e4fa6d1f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab">end</a> ()</td></tr>
<tr class="memdesc:a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the last method in a continuation chain.  <a href="#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab">More...</a><br /></td></tr>
<tr class="separator:a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfefeb6cc6bcc74afea9c3d6080ac952"><td class="memTemplParams" colspan="2">template&lt;class OTHER_RET , class FUNC , class ... ARGS&gt; </td></tr>
<tr class="memitem:adfefeb6cc6bcc74afea9c3d6080ac952"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#aa26dcdfb6c3930c1cd2b4000d8711f4c">ThreadContextPtr</a>&lt; OTHER_RET &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#adfefeb6cc6bcc74afea9c3d6080ac952">then</a> (FUNC &amp;&amp;func, ARGS &amp;&amp;... args)</td></tr>
<tr class="separator:adfefeb6cc6bcc74afea9c3d6080ac952"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a36a254b425ab7c584820580370bbab"><td class="memTemplParams" colspan="2">template&lt;class OTHER_RET , class FUNC , class ... ARGS&gt; </td></tr>
<tr class="memitem:a1a36a254b425ab7c584820580370bbab"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#aa26dcdfb6c3930c1cd2b4000d8711f4c">ThreadContextPtr</a>&lt; OTHER_RET &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a1a36a254b425ab7c584820580370bbab">onError</a> (FUNC &amp;&amp;func, ARGS &amp;&amp;... args)</td></tr>
<tr class="separator:a1a36a254b425ab7c584820580370bbab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a442313a7564ebe7982a03737742fa8ea"><td class="memTemplParams" colspan="2">template&lt;class OTHER_RET , class FUNC , class ... ARGS&gt; </td></tr>
<tr class="memitem:a442313a7564ebe7982a03737742fa8ea"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#aa26dcdfb6c3930c1cd2b4000d8711f4c">ThreadContextPtr</a>&lt; OTHER_RET &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a442313a7564ebe7982a03737742fa8ea">finally</a> (FUNC &amp;&amp;func, ARGS &amp;&amp;... args)</td></tr>
<tr class="separator:a442313a7564ebe7982a03737742fa8ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_structBloomberg_1_1quantum_1_1IContextBase')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html">Bloomberg::quantum::IContextBase</a></td></tr>
<tr class="memitem:a39a012af6799019e99e1ab5364bb2c86 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a39a012af6799019e99e1ab5364bb2c86">~IContextBase</a> ()=default</td></tr>
<tr class="memdesc:a39a012af6799019e99e1ab5364bb2c86 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <a href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a39a012af6799019e99e1ab5364bb2c86">More...</a><br /></td></tr>
<tr class="separator:a39a012af6799019e99e1ab5364bb2c86 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a022df5fbd098b18058823ac74e4491d1 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a022df5fbd098b18058823ac74e4491d1">valid</a> () const =0</td></tr>
<tr class="memdesc:a022df5fbd098b18058823ac74e4491d1 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if the future object associated with this context has a valid shared state with the corresponding promise.  <a href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a022df5fbd098b18058823ac74e4491d1">More...</a><br /></td></tr>
<tr class="separator:a022df5fbd098b18058823ac74e4491d1 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cb482148c731b5b9d6866d7e57f962f inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a5cb482148c731b5b9d6866d7e57f962f">validAt</a> (int num) const =0</td></tr>
<tr class="memdesc:a5cb482148c731b5b9d6866d7e57f962f inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if the future object associated with the 'num'-th continuation context is still valid.  <a href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a5cb482148c731b5b9d6866d7e57f962f">More...</a><br /></td></tr>
<tr class="separator:a5cb482148c731b5b9d6866d7e57f962f inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a084048c88d90de4f3797f18fb3c5fcc4 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a084048c88d90de4f3797f18fb3c5fcc4">setException</a> (std::exception_ptr ex)=0</td></tr>
<tr class="memdesc:a084048c88d90de4f3797f18fb3c5fcc4 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set an exception in the promise associated with the current <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html" title="Exposes methods to manipulate the thread context.">IThreadContext</a> or <a class="el" href="../../d5/dd1/structBloomberg_1_1quantum_1_1ICoroContext.html" title="Exposes methods to manipulate the coroutine context.">ICoroContext</a>.  <a href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#a084048c88d90de4f3797f18fb3c5fcc4">More...</a><br /></td></tr>
<tr class="separator:a084048c88d90de4f3797f18fb3c5fcc4 inherit pub_methods_structBloomberg_1_1quantum_1_1IContextBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class RET&gt;<br />
interface Bloomberg::quantum::IThreadContext&lt; RET &gt;</h3>

<p>Exposes methods to manipulate the thread context. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">RET</td><td>The type of value returned via the promise associated with this context. </td></tr>
  </table>
  </dd>
</dl>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="ac70ef12cc80708a891d3ca1090adff2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac70ef12cc80708a891d3ca1090adff2e">&#9670;&nbsp;</a></span>ContextTag</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::<a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#ac70ef12cc80708a891d3ca1090adff2e">ContextTag</a> =  <a class="el" href="../../de/de9/structBloomberg_1_1quantum_1_1ThreadContextTag.html">ThreadContextTag</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab3c1dd50a3abd82d5d881eeda65e32e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3c1dd50a3abd82d5d881eeda65e32e5">&#9670;&nbsp;</a></span>Impl</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::<a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#ab3c1dd50a3abd82d5d881eeda65e32e5">Impl</a> =  <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html">Context</a>&lt;RET&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a0b7724a925c43a5a9661e90f7f331651"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b7724a925c43a5a9661e90f7f331651">&#9670;&nbsp;</a></span>Ptr</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::<a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a> =  std::shared_ptr&lt;<a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a>&lt;RET&gt; &gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aef2bff661268949c9c598e0674ff7254"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef2bff661268949c9c598e0674ff7254">&#9670;&nbsp;</a></span>closeBuffer()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
<div class="memtemplate">
template&lt;class V , class &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::closeBuffer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close a promise buffer. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">BUF</td><td>Represents a class of type <a class="el" href="../../d1/d87/classBloomberg_1_1quantum_1_1Buffer.html" title="Container which allows buffered access to a series of values. Values are pushed-in (written) by a pro...">Buffer</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Once closed no more Pushes can be made into the buffer. The corresponding future can still Pull values until the buffer is empty. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a60c1b4501689af034dfcb9c284b8286e">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab">&#9670;&nbsp;</a></span>end()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a>&lt; RET &gt;::<a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a> <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the last method in a continuation chain. </p>
<p>This method effectively closes the continuation chain and posts the entire chain to be executed, respecting the 'queueId' and priority specified at the beginning of the chain (see postFirst()). </p><dl class="section return"><dt>Returns</dt><dd>Pointer to this context. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>This method does not take any functions as parameter as it is strictly used for scheduling purposes. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a671d7fb7fb234086b568a101dde84b0b">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a442313a7564ebe7982a03737742fa8ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a442313a7564ebe7982a03737742fa8ea">&#9670;&nbsp;</a></span>finally() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<div class="memtemplate">
template&lt;class OTHER_RET , class FUNC , class ... ARGS&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#aa26dcdfb6c3930c1cd2b4000d8711f4c">ThreadContextPtr</a>&lt;OTHER_RET&gt; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::finally </td>
          <td>(</td>
          <td class="paramtype">FUNC &amp;&amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ARGS &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#ad6ad88afbd04d2ff1d325ec3f785af98">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a6ac11b61f3c2ec6f8b415239dfe8342c">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="affbdb2bb8e1292cddd90684e4fa6d1f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affbdb2bb8e1292cddd90684e4fa6d1f4">&#9670;&nbsp;</a></span>finally() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<div class="memtemplate">
template&lt;class OTHER_RET  = int, class FUNC , class ... ARGS&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a>&lt;OTHER_RET&gt;::<a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a> <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::finally </td>
          <td>(</td>
          <td class="paramtype">FUNC &amp;&amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ARGS &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Posts a function to run asynchronously. This function is always guaranteed to run. </p>
<p>This function is optional for the continuation chain and may be called at most once. If called, it must immediately precede the <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab" title="This is the last method in a continuation chain.">end()</a> method. This method will run regardless if any preceding functions have an error or not. It can be used for cleanup purposes, closing handles, terminating services, etc. </p><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">OTHER_RET</td><td>Type of future returned by this function. </td></tr>
    <tr><td class="paramname">FUNC</td><td>Callable object type. Can be a standalone function, a method, an std::function, a functor generated via std::bind or a lambda. The signature of the callable object must strictly be 'int f(CoroContext&lt;RET&gt;::Ptr, ...)'. </td></tr>
    <tr><td class="paramname">ARGS</td><td>Argument types passed to FUNC. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Callable object. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Variable list of arguments passed to the callable object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function is non-blocking and returns immediately. After this function, the <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab" title="This is the last method in a continuation chain.">end()</a> method must be called. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#ad6ad88afbd04d2ff1d325ec3f785af98">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a6ac11b61f3c2ec6f8b415239dfe8342c">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a8c969eafd7cdd1b694c33194a9dd7c09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c969eafd7cdd1b694c33194a9dd7c09">&#9670;&nbsp;</a></span>get()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
<div class="memtemplate">
template&lt;class V &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a0a7dd2b5f475bbecb11bfa87fcc251c5">NonBufferRetType</a>&lt; V &gt; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the future value associated with this context. </p>
<dl class="section note"><dt>Note</dt><dd>Blocks until the future is ready or until an exception is thrown. Once this function returns, the future becomes invalidated (i.e. cannot be read again). </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a9f6d2ba69b3d5553fd009bb7cd6d507b">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a8d04a093d07bf66ead58603592295352"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d04a093d07bf66ead58603592295352">&#9670;&nbsp;</a></span>getAt()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
<div class="memtemplate">
template&lt;class OTHER_RET &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a0a7dd2b5f475bbecb11bfa87fcc251c5">NonBufferRetType</a>&lt; OTHER_RET &gt; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::getAt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the future value from the 'num-th' continuation context. </p>
<p>Allowed range for num is [-1, total_continuations). -1 is equivalent of calling <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a8c969eafd7cdd1b694c33194a9dd7c09" title="Get the future value associated with this context.">get()</a> or getAt(total_continuations-1) on the last context in the chain (i.e. the context which is returned via <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab" title="This is the last method in a continuation chain.">end()</a>). Position 0 represents the first future in the chain. </p><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">OTHER_RET</td><td>The type of the future value associated with the 'num-th' context. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>The number indicating which future to wait on. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The future value of the 'num-th' thread context. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Blocks until the future is ready or until an exception is thrown. Once this function returns, the future is invalidated (i.e. cannot be read again). </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#ac90b19af9520df4882b8d1f9a0f9ad0c">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a42ea867e65bc7e31a4373dc2142cef75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42ea867e65bc7e31a4373dc2142cef75">&#9670;&nbsp;</a></span>getCoroQueueIdRangeForAny()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const std::pair&lt; int, int &gt; &amp; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::getCoroQueueIdRangeForAny </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the range [minQueueId, maxQueueId] of coroutine queueIds covered by <a class="el" href="../../d2/db0/structBloomberg_1_1quantum_1_1IQueue.html#aec9f17dc0836162032f0239b2415649eaed36a1ef76a59ee3f15180e0441188ad">IQueue::QueueId::Any</a> by the <a class="el" href="../../d0/da5/classBloomberg_1_1quantum_1_1Dispatcher.html" title="Parallel execution engine used to run coroutines or IO tasks asynchronously. This class is the main e...">Dispatcher</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>queueIdRange The range of queueIds that <a class="el" href="../../d2/db0/structBloomberg_1_1quantum_1_1IQueue.html#aec9f17dc0836162032f0239b2415649eaed36a1ef76a59ee3f15180e0441188ad">IQueue::QueueId::Any</a> covers </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a70e2d72600c412fdeca447b9b111991c">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a974f72467140b4d4047d8b76d2011703"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a974f72467140b4d4047d8b76d2011703">&#9670;&nbsp;</a></span>getNumCoroutineThreads()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::getNumCoroutineThreads </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of underlying coroutine threads as specified in the dispatcher constructor. If -1 was passed than this number essentially indicates the number of cores. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of threads. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Each thread services its own queueId, therefore this number can be used when assigning coroutines to a specific queue. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a66b2fe051e1b72e6a045cb0a3e57b9d2">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="aaf40c9f4c874571d103a2b40c2dbf554"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf40c9f4c874571d103a2b40c2dbf554">&#9670;&nbsp;</a></span>getNumIoThreads()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::getNumIoThreads </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of underlying IO threads as specified in the dispatcher constructor. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of threads. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Each thread services its own queueId, therefore this number can be used when assigning IO tasks to a specific queue. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a5855eee0ab54a2d606cdc96196816a74">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a2eed7d5de4d43b5c5c214cb38b239acd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2eed7d5de4d43b5c5c214cb38b239acd">&#9670;&nbsp;</a></span>getRef()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
<div class="memtemplate">
template&lt;class V &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a0a7dd2b5f475bbecb11bfa87fcc251c5">NonBufferRetType</a>&lt; V &gt; &amp; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::getRef </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a reference the future value associated with this context. </p>
<dl class="section return"><dt>Returns</dt><dd>A reference to the future value. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Blocks until the future is ready or until an exception is thrown. Contrary to <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a8c969eafd7cdd1b694c33194a9dd7c09" title="Get the future value associated with this context.">get()</a>, this function does not invalidate the future and as such may be read again. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#afc148b852493915dfa3925f4d8ca80e4">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a5456b3de0627bee9695946acf745e195"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5456b3de0627bee9695946acf745e195">&#9670;&nbsp;</a></span>getRefAt()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
<div class="memtemplate">
template&lt;class OTHER_RET &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a0a7dd2b5f475bbecb11bfa87fcc251c5">NonBufferRetType</a>&lt; OTHER_RET &gt; &amp; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::getRefAt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a reference to the future value from the 'num-th' continuation context. </p>
<p>Allowed range for num is [-1, total_continuations). -1 is equivalent of calling <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a8c969eafd7cdd1b694c33194a9dd7c09" title="Get the future value associated with this context.">get()</a> or getAt(total_continuations-1) on the last context in the chain (i.e. the context which is returned via <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab" title="This is the last method in a continuation chain.">end()</a>). Position 0 represents the first future in the chain. </p><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">OTHER_RET</td><td>The type of the future value associated with the 'num-th' context. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>The number indicating which future to wait on. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A reference to the future value of the 'num-th' thread context. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Blocks until the future is ready or until an exception is thrown. Contrary to <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a8d04a093d07bf66ead58603592295352" title="Get the future value from the &#39;num-th&#39; continuation context.">getAt()</a> this function will not invalidate the future and as such it can be read again. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a3f03e8a60cefa9aed0d9de63fcc63452">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a1a36a254b425ab7c584820580370bbab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a36a254b425ab7c584820580370bbab">&#9670;&nbsp;</a></span>onError() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<div class="memtemplate">
template&lt;class OTHER_RET , class FUNC , class ... ARGS&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#aa26dcdfb6c3930c1cd2b4000d8711f4c">ThreadContextPtr</a>&lt;OTHER_RET&gt; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::onError </td>
          <td>(</td>
          <td class="paramtype">FUNC &amp;&amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ARGS &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a311a7045f6c47e5aba887d109bb08a20">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#af16615063c053d9f5c60cbdfc2e4ca3e">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="aa911856faa7b71962984a101cfb59cf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa911856faa7b71962984a101cfb59cf0">&#9670;&nbsp;</a></span>onError() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<div class="memtemplate">
template&lt;class OTHER_RET  = int, class FUNC , class ... ARGS&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a>&lt;OTHER_RET&gt;::<a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a> <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::onError </td>
          <td>(</td>
          <td class="paramtype">FUNC &amp;&amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ARGS &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Posts a function to run asynchronously. This is the error handler for a continuation chain and acts as as a 'catch' clause. </p>
<p>This function is optional for the continuation chain and may be called at most once. If called, it must follow postFirst() or another <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a7a6bbcc70d8d886864351513680ede87" title="Posts a function to run asynchronously.">then()</a> method. This method will conditionally run if-and-only-if any previous functions in the continuation chain return an error or throw. When a function which is part of a continuation chain has an error, all subsequent <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a7a6bbcc70d8d886864351513680ede87" title="Posts a function to run asynchronously.">then()</a> methods are skipped and if <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#aa911856faa7b71962984a101cfb59cf0" title="Posts a function to run asynchronously. This is the error handler for a continuation chain and acts a...">onError()</a> is provided it will be called. If there are no errors, this method is skipped. </p><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">OTHER_RET</td><td>Type of future returned by this function. </td></tr>
    <tr><td class="paramname">FUNC</td><td>Callable object type. Can be a standalone function, a method, an std::function, a functor generated via std::bind or a lambda. The signature of the callable object must strictly be 'int f(ThreadContext&lt;RET&gt;::Ptr, ...)'. </td></tr>
    <tr><td class="paramname">ARGS</td><td>Argument types passed to FUNC. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Callable object. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Variable list of arguments passed to the callable object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The function is non-blocking. The returned context can be used to chain further functions. Possible method calls following this are <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#affbdb2bb8e1292cddd90684e4fa6d1f4" title="Posts a function to run asynchronously. This function is always guaranteed to run.">finally()</a> and <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab" title="This is the last method in a continuation chain.">end()</a>. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a311a7045f6c47e5aba887d109bb08a20">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#af16615063c053d9f5c60cbdfc2e4ca3e">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a65ced94956cdfff4ad094897b14f8234"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65ced94956cdfff4ad094897b14f8234">&#9670;&nbsp;</a></span>pull()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
<div class="memtemplate">
template&lt;class V &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#a3e3f89ff8206c0514976b423cb7199cd">BufferRetType</a>&lt; V &gt; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::pull </td>
          <td>(</td>
          <td class="paramtype">bool &amp;&#160;</td>
          <td class="paramname"><em>isBufferClosed</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pull a single value from the future buffer. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">BUF</td><td>Represents a class of type <a class="el" href="../../d1/d87/classBloomberg_1_1quantum_1_1Buffer.html" title="Container which allows buffered access to a series of values. Values are pushed-in (written) by a pro...">Buffer</a>. </td></tr>
    <tr><td class="paramname">V</td><td>The type of value contained in <a class="el" href="../../d1/d87/classBloomberg_1_1quantum_1_1Buffer.html" title="Container which allows buffered access to a series of values. Values are pushed-in (written) by a pro...">Buffer</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">isBufferClosed</td><td>Indicates if this buffer is closed and no more Pull operations are allowed on it. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The next value pulled out from the front of the buffer. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Method available for buffered futures only. Blocks until one value is retrieved from the buffer. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a92e7d6dac6001c2f0fd9da6934e81440">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="ab6e481262f106b0ed5fd5c0b86978c03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6e481262f106b0ed5fd5c0b86978c03">&#9670;&nbsp;</a></span>push()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
<div class="memtemplate">
template&lt;class V , class &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::push </td>
          <td>(</td>
          <td class="paramtype">V &amp;&amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Push a single value into the promise buffer. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">BUF</td><td>Represents a class of type <a class="el" href="../../d1/d87/classBloomberg_1_1quantum_1_1Buffer.html" title="Container which allows buffered access to a series of values. Values are pushed-in (written) by a pro...">Buffer</a>. </td></tr>
    <tr><td class="paramname">V</td><td>The type of value contained in <a class="el" href="../../d1/d87/classBloomberg_1_1quantum_1_1Buffer.html" title="Container which allows buffered access to a series of values. Values are pushed-in (written) by a pro...">Buffer</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>Value to push at the end of the buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Method available for buffered futures only. Never blocks. Once the buffer is closed, no more Push operations are allowed. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a6cc68322709515d1586cf453276f2100">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a5612c3e719e8fe2104ada21a10767b4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5612c3e719e8fe2104ada21a10767b4a">&#9670;&nbsp;</a></span>set()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET &gt; </div>
<div class="memtemplate">
template&lt;class V , class &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::set </td>
          <td>(</td>
          <td class="paramtype">V &amp;&amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the promised value associated with this context. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">V</td><td>Type of the promised value. This should be implicitly deduced by the compiler and should always == RET. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>A reference to the value (l-value or r-value). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Never blocks. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#aaf24cac3dcdf0bf21b7301e606fa4d1a">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="adfefeb6cc6bcc74afea9c3d6080ac952"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adfefeb6cc6bcc74afea9c3d6080ac952">&#9670;&nbsp;</a></span>then() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<div class="memtemplate">
template&lt;class OTHER_RET , class FUNC , class ... ARGS&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html#aa26dcdfb6c3930c1cd2b4000d8711f4c">ThreadContextPtr</a>&lt;OTHER_RET&gt; <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::then </td>
          <td>(</td>
          <td class="paramtype">FUNC &amp;&amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ARGS &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a1848dc5d7547ba112a44721951603669">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a4a7b792045fd293b26b4a265a713df6c">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a7a6bbcc70d8d886864351513680ede87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a6bbcc70d8d886864351513680ede87">&#9670;&nbsp;</a></span>then() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<div class="memtemplate">
template&lt;class OTHER_RET  = int, class FUNC , class ... ARGS&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a>&lt;OTHER_RET&gt;::<a class="el" href="../../d8/db0/structBloomberg_1_1quantum_1_1IContextBase.html#ac92e5d294479f777fd01f5621e4f8db9">Ptr</a> <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::then </td>
          <td>(</td>
          <td class="paramtype">FUNC &amp;&amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ARGS &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Posts a function to run asynchronously. </p>
<dl class="section attention"><dt>Attention</dt><dd>Continuation methods are typically chained in the following manner and must follow the relative placement below. postFirst() and <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab" title="This is the last method in a continuation chain.">end()</a> are the only mandatory methods. <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#aa911856faa7b71962984a101cfb59cf0" title="Posts a function to run asynchronously. This is the error handler for a continuation chain and acts a...">onError()</a> and <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#affbdb2bb8e1292cddd90684e4fa6d1f4" title="Posts a function to run asynchronously. This function is always guaranteed to run.">finally()</a> can be called at most once, whereas <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a7a6bbcc70d8d886864351513680ede87" title="Posts a function to run asynchronously.">then()</a> may be called zero or more times.</dd></dl>
<div class="fragment"><div class="line"><a class="code" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a0b7724a925c43a5a9661e90f7f331651">IThreadContext&lt;RET&gt;::Ptr</a> ctx = <a class="code" href="../../d0/da5/classBloomberg_1_1quantum_1_1Dispatcher.html#a1ea6c5d5a3355cc92a1ac989ba0731e5">Dispatcher::postFirst</a>()-&gt;then()-&gt;...-&gt;then()-&gt;onError()-&gt;finally()-&gt;end();</div></div><!-- fragment --><p>This function is optional for the continuation chain and may be called 0 or more times. If called, it must follow postFirst() or another <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a7a6bbcc70d8d886864351513680ede87" title="Posts a function to run asynchronously.">then()</a> method. </p><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">OTHER_RET</td><td>Type of future returned by this function. </td></tr>
    <tr><td class="paramname">FUNC</td><td>Callable object type. Can be a standalone function, a method, an std::function, a functor generated via std::bind or a lambda. The signature of the callable object must strictly be 'int f(ThreadContext&lt;RET&gt;::Ptr, ...)'. </td></tr>
    <tr><td class="paramname">ARGS</td><td>Argument types passed to FUNC. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Callable object. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Variable list of arguments passed to the callable object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function is non-blocking and runs when all previous chained functions have completed. The returned context can be used to chain further functions. Possible method calls following this are <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a7a6bbcc70d8d886864351513680ede87" title="Posts a function to run asynchronously.">then()</a>, <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#aa911856faa7b71962984a101cfb59cf0" title="Posts a function to run asynchronously. This is the error handler for a continuation chain and acts a...">onError()</a>, <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#affbdb2bb8e1292cddd90684e4fa6d1f4" title="Posts a function to run asynchronously. This function is always guaranteed to run.">finally()</a> and <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab" title="This is the last method in a continuation chain.">end()</a>. </dd></dl>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a1848dc5d7547ba112a44721951603669">Bloomberg::quantum::Context&lt; RET &gt;</a>, and <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a4a7b792045fd293b26b4a265a713df6c">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a61b2eb7438e46915e411d3fd7e96b82d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61b2eb7438e46915e411d3fd7e96b82d">&#9670;&nbsp;</a></span>wait()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::wait </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Waits for the future associated with this context to be ready. </p>
<dl class="section note"><dt>Note</dt><dd>Blocks until the future is ready or until an exception is thrown. </dd></dl>

<p>Implements <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#ab76735c9a8cbb1f8ff193d122b70f642">Bloomberg::quantum::IThreadContextBase</a>.</p>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a084c691c4873a2dd206b05ecd3e5dd34">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a4724f410e1d41c185f46ad394ad3bbe2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4724f410e1d41c185f46ad394ad3bbe2">&#9670;&nbsp;</a></span>waitAll()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::waitAll </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Wait for all the futures in the continuation chain to be ready. </p>
<dl class="section note"><dt>Note</dt><dd>Blocks until all future values are ready. If any future throws, the exception is swallowed. </dd></dl>

<p>Implements <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#a56cf07f98b78dee7ab87a4899feffda2">Bloomberg::quantum::IThreadContextBase</a>.</p>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a945677eefa8942162876ddc8a96e2a3f">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="ac31560ef1209af2c86a76260dd70b189"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac31560ef1209af2c86a76260dd70b189">&#9670;&nbsp;</a></span>waitAt()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::waitAt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Waits for the future in the 'num-th' continuation context to be ready. </p>
<p>Allowed range for num is [-1, total_continuations). -1 is equivalent of calling <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a61b2eb7438e46915e411d3fd7e96b82d" title="Waits for the future associated with this context to be ready.">wait()</a> or waitAt(total_continuations-1) on the last context in the chain (i.e. the context which is returned via <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab" title="This is the last method in a continuation chain.">end()</a>). Position 0 represents the first future in the chain. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>The number indicating which future to wait on. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Blocks until the value is ready or an exception is thrown. </dd></dl>

<p>Implements <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#a52d3339262492bdac8e51d6317a5c4e3">Bloomberg::quantum::IThreadContextBase</a>.</p>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#ac89818fc8478508cad80c6cdb833e2dd">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a0bb2b08d8b6688e2186aaf3afb394dae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bb2b08d8b6688e2186aaf3afb394dae">&#9670;&nbsp;</a></span>waitFor()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::future_status <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::waitFor </td>
          <td>(</td>
          <td class="paramtype">std::chrono::milliseconds&#160;</td>
          <td class="paramname"><em>timeMs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Waits for the future associated with this context to be ready for a maximum of 'timeMs' milliseconds. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timeMs</td><td>The maximum amount of milliseconds to wait until the future value becomes ready. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>'ready' if value was posted before duration expired or 'timeout' otherwise. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Blocks until the value is ready, until 'timeMs' duration expires or until an exception is thrown. </dd></dl>

<p>Implements <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#a84d767595a4b8acb729b759c500a4cba">Bloomberg::quantum::IThreadContextBase</a>.</p>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a3472f64cc9dd65b058f8fcbabc4e3d02">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
<a id="a6488bdb8b5c270ebaa069d7d9ed5819a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6488bdb8b5c270ebaa069d7d9ed5819a">&#9670;&nbsp;</a></span>waitForAt()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class RET&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::future_status <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">Bloomberg::quantum::IThreadContext</a>&lt; RET &gt;::waitForAt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::chrono::milliseconds&#160;</td>
          <td class="paramname"><em>timeMs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Waits for the future in the 'num-th' continuation context to be ready for a maximum of 'timeMs' milliseconds. </p>
<p>Allowed range for num is [-1, total_continuations). -1 is equivalent of calling <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a61b2eb7438e46915e411d3fd7e96b82d" title="Waits for the future associated with this context to be ready.">wait()</a> or waitAt(total_continuations-1) on the last context in the chain (i.e. the context which is returned via <a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html#a3a0a83b7941b8b0cf2c0a9ce6ec0f7ab" title="This is the last method in a continuation chain.">end()</a>). Position 0 represents the first future in the chain. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>The number indicating which future to wait on. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timeMs</td><td>The maximum amount of milliseconds to wait until the future value becomes ready. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>'ready' if value was posted before duration expired or 'timeout' otherwise. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Blocks until the value is ready, until 'timeMs' duration expires or until an exception is thrown. </dd></dl>

<p>Implements <a class="el" href="../../da/d4d/structBloomberg_1_1quantum_1_1IThreadContextBase.html#ab3ad8ed1eae83ea16a8a6cda36243fe4">Bloomberg::quantum::IThreadContextBase</a>.</p>

<p>Implemented in <a class="el" href="../../d8/df7/classBloomberg_1_1quantum_1_1Context.html#a13a7039dd07811ced226e5adc29d6819">Bloomberg::quantum::Context&lt; RET &gt;</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d6/db9/namespaceBloomberg.html">Bloomberg</a></li><li class="navelem"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html">quantum</a></li><li class="navelem"><a class="el" href="../../da/de3/structBloomberg_1_1quantum_1_1IThreadContext.html">IThreadContext</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
